<?php
namespace Admin\Service;


class OrderService
{

    public  function  __construct(){

    }
    //拒绝
    public  function  doRefuse($orderId,$remake){
        $orderInfo = M("order")->where(array("order_id"=>$orderId))->find();
        if(!empty($orderInfo)&&$orderInfo["order_status"]==1){
            M("order")->where(array("order_id"=>$orderId))->save(
                array(
                    "order_status"=>6,
                    "refuse_remake"=>$remake,
                    "refuse_time"=>date("Y-m-d H:i:s",time())));
            return ["code"=>1,"msg"=>"ok"];
        }
        return ["code"=>0,"msg"=>"error"];
    }

}